using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Budgetor.DataVizualization
{
    public interface IDataVizualizationPanel
    {
        void UpdateData(object sender, DataEventArgs e);
    }

    public class DataEventArgs : EventArgs
    {
        private Data[] dataCollection;
        public Data[] DataCollection
        {
            get { return dataCollection; }
        }

        public DataEventArgs(BindingSource source)
        {
            List<Data> dataList = new List<Data>();

            foreach (object data in source)
            {
                dataList.Add(data as Data);
            }

            dataList.Sort();

            this.dataCollection = dataList.ToArray();
        }
    }
}
